package woaini.wind.bot.ai;

import com.alibaba.fastjson2.JSONObject;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import woaini.wind.bot.ai.service.AiChangeFaceService;

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/ai/changeFace")
public class AiChangeFaceController {

  private final AiChangeFaceService aiChangeFaceService;

  @PostMapping("")
  public JSONObject faceChange(@RequestParam("template") MultipartFile template,@RequestParam("image") MultipartFile image) {
    return aiChangeFaceService.faceChange(template, image);
  }
}
